<template>
	<view class="page" :style="{'min-height':h+'px','padding-top':(mt)+'px'}">
		<c-nav-bar :title="titles"></c-nav-bar>

		<view class="result">
			<image src="https://i.ringzle.com/file/20240129/a864f7a42a3b4027b2a3410c6b13e932.png" mode="aspectFill">
			</image>
			<text>支付成功</text>
			<!-- <view>￥<span>{{price}}</span></view> -->
		</view>
		<view class="btns">
			<view @tap="toDetails">订单详情</view>
			<view @tap="toReturnHome">返回首页</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'payResult',
		data() {
			return {
				price: '',
				orderId: '',
				titles: '安全收银台',
				h: uni.getSystemInfoSync().windowHeight,
				mt: uni.getSystemInfoSync().statusBarHeight + 44,
			}
		},
		onLoad(option) {
			console.log(JSON.parse(option.list), '123456789');
			this.price = JSON.parse(option.list).price;
			this.orderId = JSON.parse(option.list).orderId;
			console.log(this.price, this.orderId);
		},
		methods: {
			toDetails() {
				console.log(this.orderId);
				uni.navigateTo({
					url: '/pagesTrip/hotel/orderDetails/index?orderId=' + this.orderId
				})
			},
			toReturnHome() {
				uni.reLaunch({
					url: '/pages/index/index'
				})

			}
		}
	}
</script>

<style scoped lang="less">
	.page {
		padding: 64rpx 40rpx;

		.result {
			padding-top: 50rpx;
			display: flex;
			flex-direction: column;
			align-items: center;

			image {
				width: 96rpx;
				height: 96rpx;
			}

			&>text {
				font-size: 32rpx;
				font-family: PingFang-SC-Bold, PingFang-SC;
				font-weight: bold;
				color: #111111;
				margin-top: 20rpx;
			}

			&>view {
				font-size: 36rpx;
				font-family: ArialMT;
				color: #333333;
				margin-top: 20rpx;

				span {
					font-size: 48rpx;
					font-family: Arial-BoldMT, Arial;
					font-weight: BoldMT;
					color: #333333;
				}
			}
		}

		.btns {
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-top: 268rpx;

			&>view {
				width: calc(50% - 22rpx);
				height: 88rpx;
				border-radius: 46rpx;
				border: 2rpx solid #CCCCCC;
				line-height: 88rpx;
				text-align: center;
				font-size: 32rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #333333;

				&:last-child {
					border: 2rpx solid #007A69;
					color: #007A69;
				}
			}
		}
	}
</style>